package com.dycn.dao;
import java.util.List;
import java.util.Date;

import com.dycn.model.CyUser;
import com.dycn.model.TasksActivities;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CyUserMapper {
    int deleteByPrimaryKey(String id);

    int insert(CyUser record);

    int insertSelective(CyUser record);

    CyUser selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(CyUser record);

    int updateByPrimaryKey(CyUser record);

    List<CyUser> findByTaskIdAndDaydate(@Param("taskId")String taskId, @Param("daydate")Date daydate);

    List<CyUser> findByOpenidAndTaskIdAndDaydate(@Param("openid")String openid,@Param("taskId")String taskId,@Param("daydate")Date daydate);
    List<CyUser> findByOpenidAndTaskId(@Param("openid")String openid,@Param("taskId")String taskId,@Param("activityId")Integer activityId);
    List<CyUser> findByTaskId(@Param("taskId")String taskId);
    int findSignCount(@Param("openid")String openid,@Param("activityId")Integer activityId);


    CyUser findDaySign(@Param("openid")String openid,@Param("activityId")Integer activityId);

    List<CyUser> listUserSign(@Param("openid")String openid,@Param("activityId")Integer activityId);

    List<CyUser> listSign(@Param("activityId")Integer activityId);

    CyUser findNewSign(@Param("openid")String openid,@Param("activityId")Integer activityId);
//获取最近7天签到
    List<CyUser> listSigns(@Param("openid")String openid,@Param("activityId")Integer activityId);

    int findCountByTypeAndTaskId(@Param("type")Integer type,@Param("taskId")String taskId,@Param("activityId")Integer activityId);
}